﻿using System.Diagnostics;

namespace DimensionsHelper.LanguageService.Syntax;

public class MetadataScale : MetadataSingleArgumentSuffix<Expression>
{
    internal MetadataScale(SyntaxToken declareKeywordToken, SyntaxNode? parent)
        : base(SyntaxKinds.MetadataScale,
            declareKeywordToken,
            NodeConverter.ToIdentifier(declareKeywordToken),
            parent)
    {
    }
}


public static partial class NodeFactory
{
    public static MetadataScale CreateMetadataScale(SyntaxNode? parent,
        SyntaxToken scaleKeywordToken, Expression? value)
    {
        Debug.Assert(scaleKeywordToken.IsNode(SyntaxKinds.ScaleKeywordToken));
        MetadataScale scale = new(scaleKeywordToken, parent);
        return UpdateMetadataSingleArgumentSuffix(scale, value);
    }
}